import request from '../../utils/request'

//获取列表
export const getList = (params) => {
    return request({
        url: '/intermediary/order/list',
        method: 'get',
        params
    })
}

//创建订单
export const create = (data) => {
    return request({
        url: '/intermediary/order/create',
        method: 'post',
        data
    })
}

//修改订单
export const edit = (data) => {
    return request({
        url: '/intermediary/order',
        method: 'put',
        data
    })
}

//拉群
export const lagroup = (data) => {
    return request({
        url: '/intermediary/order/group/pull',
        method: 'post',
        data: data
    })
}

//解散群
export const canclegroup = (id) => {
    return request({
        url: '/intermediary/order/group/cancel',
        method: 'post',
        data: {id:id}
    })
}

//恢复群聊
export const recogroup = (id) => {
    return request({
        url: '/intermediary/order/group/recovery',
        method: 'post',
        data: {id:id}
    })
}

//取消订单
export const cancelOrder = (data) => {
    return request({
        url: '/intermediary/order/cancel',
        method: 'post',
        data: data
    })
}

//完成订单
export const finishOrder = (id) => {
    return request({
        url: '/intermediary/order/finish',
        method: 'post',
        data: {id:id}
    })
}

//单独修改包赔资料
export const baopeiUp = (data) => {
    return request({
        url: '/intermediary/order/update/compensation',
        method: 'post',
        data: data
    })
}

//发起售后

export const afterCreate = (data) => {
    return request({
        url: '/intermediary/after/create',
        method: 'post',
        data: data
    })
}

//中介售后

export const afterList = (data) => {
    return request({
        url: '/intermediary/after/list',
        method: 'get',
        params:data
    })
}

//同意售后
export const agree = (data) => {
    return request({
        url: '/intermediary/after/agree',
        method: 'post',
        data:data
    })
}

//拒绝售后
export const refusee = (data) => {
    return request({
        url: '/intermediary/after/refuse',
        method: 'post',
        data:data
    })
}


//发起合同
export const createContract = (data) => {
    return request({
        url: '/intermediary/order/createContract',
        method: 'post',
        data:data
    })
}


//获取订单详情
export const orderInfo = (id) => {
    return request({
        url: `/intermediary/order/${id}`,
        method: 'get',
      
    })
}

